package Entity;

import org.h2.engine.User;

import javax.json.bind.annotation.JsonbProperty;
import javax.persistence.*;

@SuppressWarnings("unused")
@Entity
public class DataDTO3 {
    public DataDTO3()
    {

    }
    public DataDTO3(String u, String n, String t, String o, String w, String p, Userinformation usermes)
    {
        this.username=u;
        this.name=n;
        this.type=t;
        this.openid=openid;
        this.wx_openid=w;
        this.faculty_title=p;
        this.usermes=usermes;
    }

    @Id
    @GeneratedValue
    @JsonbProperty("username")
    private String username;

    @JsonbProperty("name")
    private String name;

    @JsonbProperty("type")
    private String type;

    @JsonbProperty("openid")
    private String openid;

    @JsonbProperty("wx_openid")
    private String wx_openid;

    @JsonbProperty("faculty_title")
    private String faculty_title;

    @JsonbProperty("usermes")
    @OneToOne(mappedBy="dataDTO3")
    private Userinformation usermes;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getWx_openid() {
        return wx_openid;
    }

    public void setWx_openid(String wx_openid) {
        this.wx_openid = wx_openid;
    }

    public String getFaculty_title(){
        return faculty_title;
    }

    public void setFaculty_title(String faculty_title) {
        this.faculty_title = faculty_title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setUsermes(Userinformation usermes) {
        this.usermes = usermes;
    }

    public Userinformation getUsermes() {
        return usermes;
    }
}

